package com.neu.questionnaireplus.dao;

import com.neu.questionnaireplus.entity.Answerer;
import java.util.List;
import org.springframework.stereotype.Repository;

@Repository
public interface AnswererDao {

    /**
     * @Description: 查询所有答者
     * @Param: []
     * @return: java.util.List<com.neu.questionnaireplus.entity.Answerer>
     * @Author: ~FHX~ (:TSunS:)
     * @Date: 2022/10/30
     */
    List<Answerer> queryAnswerer();

    /**
     * @Description: 查询未被删除的答者
     * @Param: []
     * @return: java.util.List<com.neu.questionnaireplus.entity.Answerer>
     * @Author: ~FHX~ (:TSunS:)
     * @Date: 2022/10/31
     */
    List<Answerer> queryExistAnswerer();

    /**
     * @Description: 模糊查询答者
     * @Param: [answerer]
     * @return: java.util.List<com.neu.questionnaireplus.entity.Answerer>
     * @Author: ~FHX~ (:TSunS:)
     * @Date: 2022/10/30
     */
    List<Answerer> selectAnswererList(Answerer answerer);

    /**
     * @Description: 根据id查询答者并返回
     * @Param: [id]
     * @return: com.neu.questionnaireplus.entity.Answerer
     * @Author: ~FHX~ (:TSunS:)
     * @Date: 2022/10/30
     */
    Answerer queryAnswererByID(String id);

    /**
     * @Description: 插入一个Answerer进数据库
     * @Param: [answerer]
     * @return: boolean
     * @Author: ~FHX~ (:TSunS:)
     * @Date: 2022/10/30
     */
    int insertAnswerer(Answerer answerer);

    /**
     * @Description: 根据id更新答者
     * @Param: [answerer]
     * @return: boolean
     * @Author: ~FHX~ (:TSunS:)
     * @Date: 2022/10/30
     */
    int updateAnswerer(Answerer answerer);

    /**
     * @Description: 根据id删除答者
     * @Param: [id]
     * @return: boolean
     * @Author: ~FHX~ (:TSunS:)
     * @Date: 2022/10/30
     */
    int deleteAnswerer(String id);

    /**
     * @Description: 根据电话查询答者对象
     * @Param: [telnumber]
     * @return: com.neu.questionnaireplus.entity.Answerer
     * @Author: ~FHX~ (:TSunS:)
     * @Date: 2022/10/30
     */
    Answerer queryAnswererByPhone(String telnumber);

    /**
     * @Description: 通过用户名精确查询答者
     * @Param: [username]
     * @return: com.neu.questionnaireplus.entity.Answerer
     * @Author: ~FHX~ (:TSunS:)
     * @Date: 2022/10/31
     */
    Answerer queryAnswererByUsername(String username);

    /**
     * @Description:  通过用户名模糊查询答者
     * @Param: [username]
     * @return: com.neu.questionnaireplus.entity.Answerer
     * @Author: ~FHX~ (:TSunS:)
     * @Date: 2022/10/31
     */
    List<Answerer> queryAnswererByName(String username);

    /** 
    * @Description: 通过电话精确查找答者 
    * @Param: [telnumber] 
    * @return: com.neu.questionnaireplus.entity.Answerer 
    * @Author: ~FHX~ (:TSunS:)
    * @Date: 2022/11/2 
    */ 
    Answerer queryAnswererByTelnumber(String telnumber);
}
